
const time_formatter = (base) => {
	let format = ''
	let week = ['星期日', '星期一','星期二','星期三','星期四','星期五','星期六']
	format += base.getFullYear() + '/'
	format += base.getMonth() + 1 + '/'
	format += base.getDate() + " "
	format += week[base.getDay()]
	
	return format
}

const get_today = () => {
	let format = ''
	let base = new Date()
	format += base.getFullYear() + '-'
	format += base.getMonth() + 1 + '-'
	format += base.getDate() + " "

	return format
}

// 将返回的完整时间去掉 只保留日期
const just_keep_date = (time) => {
	return time.split(" ")[0]
}


export default {
	time_formatter: time_formatter,
	get_today: get_today,
	just_keep_date: just_keep_date
}